import { request } from '@/service';
import type { IAccount } from '@/types/login';

/**
 * @function ACCOUNT_LOGIN 账户登陆
 */
export function ACCOUNT_LOGIN(account: IAccount) {
  return request.post({
    url: '/login',
    data: account
  });
}

export function GET_USER_INFO_BY_ID(id: number) {
  return request.get(`/users/${id}`);
}

export function GET_USER_MENU_BY_ROLE_ID(roleId: number) {
  return request.get(`/role/${roleId}/menu`);
}
